﻿using System.ComponentModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RotovapPlatform.Domain.Business.Machine.Enums;

public class ExperimentConfigEnums
{
	public enum ItemType
	{
		[Description("500ml旋蒸瓶")]
		Rotovap_500ml,

		[Description("1000ml旋蒸瓶")]
		Rotovap_1000ml,

		[Description("500ml离心瓶")]
		CentrifugeBottle_500ml,

		[Description("8ml取样瓶")]
		SampleBottle_8ml,

		[Description("普通夹爪")]
		NormalGripper,

		[Description("旋蒸夹爪")]
		RotovapGripper,
	}

	public enum RotaryBottleSize
	{
		RotaryBottle_500ml = 1,    // 500ml旋蒸瓶 
		RotaryBottle_1000ml = 2,    // 1000ml旋蒸瓶 
	}

	/// <summary>
	/// 实验阶段枚举
	/// </summary>
	public enum ExperimentStage
	{
		/// <summary>
		/// 未开始
		/// </summary>
		[Description("未开始")]
		NotStarted,

		/// <summary>
		/// 物料&条件准备阶段
		/// </summary>
		[Description("物料&条件准备")]
		MaterialAndConditionPreparation,

		/// <summary>
		/// 旋蒸阶段
		/// </summary>
		[Description("旋蒸")]
		RotaryEvaporation,

		/// <summary>
		/// 旋蒸残液处理阶段
		/// </summary>
		[Description("旋蒸残液处理")]
		EvaporationResidueProcessing,

		/// <summary>
		/// 冷凝液处理阶段
		/// </summary>
		[Description("冷凝液处理")]
		CondensateProcessing,

		/// <summary>
		/// 清洗阶段
		/// </summary>
		[Description("清洗")]
		Cleaning,

		/// <summary>
		/// 已完成
		/// </summary>
		[Description("已完成")]
		Completed,

		/// <summary>
		/// 失败
		/// </summary>
		[Description("失败")]
		Failed
	}

	/// <summary>
	/// 实验子阶段枚举
	/// </summary>
	public enum ExperimentSubStage
	{
		/// <summary>
		/// 未开始
		/// </summary>
		[Description("未开始")]
		NotStarted,

		// 物料&条件准备子阶段
		/// <summary>
		/// 控制油浴温度
		/// </summary>
		[Description("控制油浴温度")]
		ControllingOilBathTemperature,

		/// <summary>
		/// 控制冷凝油路温度
		/// </summary>
		[Description("控制冷凝油路温度")]
		ControllingCondensationTemperature,

		/// <summary>
		/// 对接旋蒸瓶
		/// </summary>
		[Description("对接旋蒸瓶")]
		InstallingRotaryBottle,

		/// <summary>
		/// 搬运物料瓶至轴液位
		/// </summary>
		[Description("搬运物料瓶至轴液位")]
		TransportingMaterialVial,

		/// <summary>
		/// 打液操作
		/// </summary>
		[Description("打液操作")]
		PumpingLiquid,

		/// <summary>
		/// 物料瓶归位
		/// </summary>
		[Description("物料瓶归位")]
		ReturningMaterialVial,

		/// <summary>
		/// 搬运空离心瓶至收集位
		/// </summary>
		[Description("搬运空离心瓶至收集位")]
		TransportingEmptyCentrifugeToCollection,


		/// <summary>
		/// 等待油浴锅&TCU温度
		/// </summary>
		[Description("等待油浴锅&TCU温度")]
		WaitingOilBathTemperatureAndTCUTemperature,


		// 旋蒸子阶段
		/// <summary>
		/// 建立真空
		/// </summary>
		[Description("建立真空")]
		VacuumBuilding,

		/// <summary>
		/// 启动旋蒸
		/// </summary>
		[Description("启动旋蒸")]
		StartingRotation,

		/// <summary>
		/// 监控旋蒸过程
		/// </summary>
		[Description("监控旋蒸过程")]
		MonitoringEvaporation,

		/// <summary>
		/// 最终收集
		/// </summary>
		[Description("最终收集")]
		FinalCollection,

		/// <summary>
		/// 归还收集瓶
		/// </summary>
		[Description("归还收集瓶")]
		ReturningCollectionBottle,

		/// <summary>
		/// 收集信息判断
		/// </summary>
		[Description("收集信息判断")]
		CollectionInfoJudgment,

		/// <summary>
		/// 准备新环境
		/// </summary>
		[Description("准备新环境")]
		PreparingNewEnvironment,

		/// <summary>
		/// 冷凝液收集
		/// </summary>
		[Description("冷凝液收集")]
		CollectingCondensate,

		/// <summary>
		/// 旋蒸结束
		/// </summary>
		[Description("旋蒸结束")]
		FinishingEvaporation,

		// 旋蒸残液处理子阶段
		/// <summary>
		/// 搬运旋蒸瓶至工作台
		/// </summary>
		[Description("搬运旋蒸瓶至工作台")]
		TransportingFlaskToWorkstation,

		/// <summary>
		/// 旋蒸残液取样
		/// </summary>
		[Description("旋蒸残液取样")]
		SamplingResidues,

		/// <summary>
		/// 旋蒸残液收集
		/// </summary>
		[Description("旋蒸残液收集")]
		CollectingResidues,

		/// <summary>
		/// 搬回旋蒸瓶至货架
		/// </summary>
		[Description("搬回旋蒸瓶至货架")]
		ReturningFlaskToShelf,

		// 冷凝液处理子阶段
		/// <summary>
		/// 冷凝液取样
		/// </summary>
		[Description("冷凝液取样")]
		SamplingCondensate,

		// 清洗子阶段
		/// <summary>
		/// 冷凝管路清洗
		/// </summary>
		[Description("冷凝管路清洗")]
		CleaningCondenser,

		/// <summary>
		/// 旋蒸管路清洗
		/// </summary>
		[Description("旋蒸管路清洗")]
		CleaningRotovapTubes,

		// 其他状态
		/// <summary>
		/// 已完成
		/// </summary>
		[Description("已完成")]
		Completed,

		/// <summary>
		/// 已暂停
		/// </summary>
		[Description("已暂停")]
		Paused,

		/// <summary>
		/// 错误
		/// </summary>
		[Description("错误")]
		Error,

		/// <summary>
		/// 运行中
		/// </summary>
		[Description("运行中")]
		InProgress
	}

	/// <summary>
	/// 阶段变更类型
	/// </summary>
	public enum StageChangeType
	{
		/// <summary>
		/// 阶段开始
		/// </summary>
		Start,

		/// <summary>
		/// 阶段完成
		/// </summary>
		Complete,

		/// <summary>
		/// 阶段失败
		/// </summary>
		Fail,

		/// <summary>
		/// 阶段暂停
		/// </summary>
		Pause,

		/// <summary>
		/// 阶段恢复
		/// </summary>
		Resume
	}

	/// <summary>
	/// 机械手状态枚举
	/// </summary>
	public enum RobotArmState
	{
		/// <summary>
		/// 空闲状态
		/// </summary>
		Idle,

		/// <summary>
		/// 忙碌状态
		/// </summary>
		Busy,

		/// <summary>
		/// 错误状态
		/// </summary>
		Error,

		/// <summary>
		/// 等待状态
		/// </summary>
		Waiting,

		/// <summary>
		/// 暂停状态
		/// </summary>
		Paused
	}
}
